package oop.java0329.work1;

public class Pilot {
    public void diver(Object obj){
        if(obj instanceof Airplane){
            ((Airplane)obj).showInfo();
            ((Airplane)obj).fly();
            ((Airplane)obj).speed();
            ((Airplane)obj).down();
        }else if(obj instanceof WarPlane){
            ((WarPlane)obj).showInfo();
            ((WarPlane)obj).fire();
            ((WarPlane)obj).hover();
            ((WarPlane)obj).fly();
            ((WarPlane)obj).speed();
            ((WarPlane)obj).down();
        }
    }
}
